package greetings

import (
	"fmt"
	"time"
)

func TickDemo() {

	//演示怎么每隔1秒执行一个任务
	ticker := time.NewTicker(10 * time.Second)
	fmt.Println("tikcer start")
	go animation()
	<-ticker.C
	fmt.Println("tikcer end")
	ticker.Stop()
}
